<style>
  .search input::-webkit-input-placeholder { /* WebKit browsers */
  color: #fff;
  } 

  .search input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
  color: #fff;
  } 

  .search input::-moz-placeholder { /* Mozilla Firefox 19+ */
  color: #fff;
  } 

  .search input:-ms-input-placeholder { /* Internet Explorer 10+ */
  color: #fff;
  }
</style>
<form id="search" method="get" action="{:url('home/'.$controller.'/index')}">
    <div class="searchdiv">
      <div class="search">
        <div class="search_input Fleft">
          {eq name="controller" value="courseware"}
          <input type="hidden" name="cid" value="{$cid|default=2}" />
          {/eq}
          <input type="text" name="kw" id="kw" value="{$kw|default=''}" placeholder="请输入搜索内容"/>
        </div>
        <div class="search_btn Fright" id="search_btn">
          <img src="__STATIC__/home/images/search_btn.png">
        </div>
        <script>
          $('#search_btn').click(function(){
            var kw = $('#kw').val();
            // console.log(kw);return false;
            if(!kw){
              alert('请输入搜索内容');
              return false;
            }
            $("#search").submit();
          })
        </script>
      </div>
    </div>
</form>